﻿using ReflectionStudio.Core.Events;
using System;
using System.ComponentModel;
using System.Data;
using System.Windows;
using WPFExcelReport.Helpers; 
namespace WPFExcelReport
{
    public partial class TDGS02
    { 
        public TDGS02()
        {

            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            MV = new VGSDAT();
            this.DataContext = MV;
            InitializeComponent();
        }
        public override void QueryCommand(object sender, RoutedEventArgs e)
        {
            dwData = TBMain.NewRow();
            dwData["GSMANDANT"] = app.Mandant;
            SResult = TMV.QGS_1(dwData);
            MergeData(SResult, false);
            base.QueryCommand(sender, e);
        }
        public void ResetSeq(object sender, RoutedEventArgs e)
        {
            //重置供应商流水号为1，EK04,EK05,地址，附加费，VR04/VR05/AB52/WDECK,WBBST,WB14,WBDAT,重置卡号为1
            
            dwData = TBMain.NewRow();
            dwData["GSMANDANT"] = app.Mandant; 
            TMV.DGS00(dwData); 

            dwData = TMV.VGSC.TBMain.NewRow();
            dwData["GSCMANDANT"] = app.Mandant; 
            TMV.VGSC.DGSC00(dwData);

            dwData = TMV.VGS08.TBMain.NewRow();
            dwData["GAGMANDANT"] = app.Mandant;
            TMV.VGS08.DGG00(dwData);
        } 
    }
}
